home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
CC_C
/
0574.ZIP
/
STRCHR.ASM
< prev
next >
Wrap
Assembly Source File
|
1986-11-21
|
408b
|
30 lines
include compiler.inc
ttl STRCHR, 1.05, 10-21-86 jwk
;string function - returns pointer to char in string
dseg
cseg
alias strchr,index
procdef strchr, <<buffr, ptr>, <targt, word>>
pushreg
pushds
ldptr si,buffr
mov dx,targt
cld
ndxlp: lodsb
or al,al
jz ndxfl
cmp al,dl
jz ndxit
jmp ndxlp
ndxfl: mov si,1
ndxit: dec si
clc
retptrr si,ds
pend strchr
finish